srcs_posix = [
    'closedir.c',
    'collate.c',
    'collcmp.c',
    'creat.c',
    'engine.c',
    'execl.c',
    'execle.c',
    'execlp.c',
    'execv.c',
    'execve.c',
    'execvp.c',
    'fnmatch.c',
    'glob.c',
    '_isatty.c',
    'isatty.c',
    'opendir.c',
    'popen.c',
    'posix_spawn.c',
    'readdir.c',
    'readdir_r.c',
    'regcomp.c',
    'regerror.c',
    'regexec.c',
    'regfree.c',
    'rewinddir.c',
    'scandir.c',
    'seekdir.c',
    'sleep.c',
    'telldir.c',
    'usleep.c',
    'wordexp.c',
    'wordfree.c',
]
hdrs_posix = [
    'cclass.h',
    'cname.h',
    'collate.h',
    'namespace.h',
    'regex2.h',
    'rune.h',
    'runetype.h',
    'sysexits.h',
    'un-namespace.h',
    'utils.h',
    'wordexp2.h',
]
foreach target : targets
	value = get_variable('target_' + target)
	set_variable('lib_posix' + target,
		static_library('posix' + target,
			srcs_posix,
			pic: false,
			include_directories: inc,
			c_args: value[1]))
endforeach
